package com.itheima.mapper;

import com.github.pagehelper.Page;
import com.itheima.common.entity.QueryPageBean;
import com.itheima.pojo.CheckPageQueryDTO;
import com.itheima.pojo.Setmeal;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface SetmealMapper {
    /**
     * 添加数据
     * @param setmeal
     */
    void insert(Setmeal setmeal);

    /**
     * 修改数据
     * @param setmeal
     */
    void update(Setmeal setmeal);

    /**
     * 根据主键ID进行套餐查询
     * @param id
     * @return
     */
    @Select("select * from t_setmeal where id = #{id}")
    Setmeal getById(@Param("id") Long id);

    /**
     * 套餐分页查询
     * @param queryPageBean
     * @return
     */
    Page<Setmeal> pageQuery(QueryPageBean queryPageBean);
}
